package com.ay.weixin.config.types;

import org.lizar.util.StringHelper;

/**
 * usercenter_status
 * 用户状态，使用name
 * 
 * */
public enum UserStatus {
	ok("正常"),
	apply("等待审核"),
	invalid("限制使用"),
	deleted("已删除"),
	unknown("未知");
	private String desc;
	private UserStatus(String desc){
		this.desc=desc;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public static UserStatus getByName(String inputName){
		for(UserStatus status:values()){
			if(StringHelper.equals(status, inputName)){
				return status;
			}
		}
		return unknown;
	}
	
}
